package com.xxgc.ssm.po;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class CommodityExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public CommodityExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andCIdIsNull() {
            addCriterion("c_id is null");
            return (Criteria) this;
        }

        public Criteria andCIdIsNotNull() {
            addCriterion("c_id is not null");
            return (Criteria) this;
        }

        public Criteria andCIdEqualTo(Long value) {
            addCriterion("c_id =", value, "cId");
            return (Criteria) this;
        }

        public Criteria andCIdNotEqualTo(Long value) {
            addCriterion("c_id <>", value, "cId");
            return (Criteria) this;
        }

        public Criteria andCIdGreaterThan(Long value) {
            addCriterion("c_id >", value, "cId");
            return (Criteria) this;
        }

        public Criteria andCIdGreaterThanOrEqualTo(Long value) {
            addCriterion("c_id >=", value, "cId");
            return (Criteria) this;
        }

        public Criteria andCIdLessThan(Long value) {
            addCriterion("c_id <", value, "cId");
            return (Criteria) this;
        }

        public Criteria andCIdLessThanOrEqualTo(Long value) {
            addCriterion("c_id <=", value, "cId");
            return (Criteria) this;
        }

        public Criteria andCIdIn(List<Long> values) {
            addCriterion("c_id in", values, "cId");
            return (Criteria) this;
        }

        public Criteria andCIdNotIn(List<Long> values) {
            addCriterion("c_id not in", values, "cId");
            return (Criteria) this;
        }

        public Criteria andCIdBetween(Long value1, Long value2) {
            addCriterion("c_id between", value1, value2, "cId");
            return (Criteria) this;
        }

        public Criteria andCIdNotBetween(Long value1, Long value2) {
            addCriterion("c_id not between", value1, value2, "cId");
            return (Criteria) this;
        }

        public Criteria andCNameIsNull() {
            addCriterion("c_name is null");
            return (Criteria) this;
        }

        public Criteria andCNameIsNotNull() {
            addCriterion("c_name is not null");
            return (Criteria) this;
        }

        public Criteria andCNameEqualTo(String value) {
            addCriterion("c_name =", value, "cName");
            return (Criteria) this;
        }

        public Criteria andCNameNotEqualTo(String value) {
            addCriterion("c_name <>", value, "cName");
            return (Criteria) this;
        }

        public Criteria andCNameGreaterThan(String value) {
            addCriterion("c_name >", value, "cName");
            return (Criteria) this;
        }

        public Criteria andCNameGreaterThanOrEqualTo(String value) {
            addCriterion("c_name >=", value, "cName");
            return (Criteria) this;
        }

        public Criteria andCNameLessThan(String value) {
            addCriterion("c_name <", value, "cName");
            return (Criteria) this;
        }

        public Criteria andCNameLessThanOrEqualTo(String value) {
            addCriterion("c_name <=", value, "cName");
            return (Criteria) this;
        }

        public Criteria andCNameLike(String value) {
            addCriterion("c_name like", value, "cName");
            return (Criteria) this;
        }

        public Criteria andCNameNotLike(String value) {
            addCriterion("c_name not like", value, "cName");
            return (Criteria) this;
        }

        public Criteria andCNameIn(List<String> values) {
            addCriterion("c_name in", values, "cName");
            return (Criteria) this;
        }

        public Criteria andCNameNotIn(List<String> values) {
            addCriterion("c_name not in", values, "cName");
            return (Criteria) this;
        }

        public Criteria andCNameBetween(String value1, String value2) {
            addCriterion("c_name between", value1, value2, "cName");
            return (Criteria) this;
        }

        public Criteria andCNameNotBetween(String value1, String value2) {
            addCriterion("c_name not between", value1, value2, "cName");
            return (Criteria) this;
        }

        public Criteria andCImgIsNull() {
            addCriterion("c_img is null");
            return (Criteria) this;
        }

        public Criteria andCImgIsNotNull() {
            addCriterion("c_img is not null");
            return (Criteria) this;
        }

        public Criteria andCImgEqualTo(String value) {
            addCriterion("c_img =", value, "cImg");
            return (Criteria) this;
        }

        public Criteria andCImgNotEqualTo(String value) {
            addCriterion("c_img <>", value, "cImg");
            return (Criteria) this;
        }

        public Criteria andCImgGreaterThan(String value) {
            addCriterion("c_img >", value, "cImg");
            return (Criteria) this;
        }

        public Criteria andCImgGreaterThanOrEqualTo(String value) {
            addCriterion("c_img >=", value, "cImg");
            return (Criteria) this;
        }

        public Criteria andCImgLessThan(String value) {
            addCriterion("c_img <", value, "cImg");
            return (Criteria) this;
        }

        public Criteria andCImgLessThanOrEqualTo(String value) {
            addCriterion("c_img <=", value, "cImg");
            return (Criteria) this;
        }

        public Criteria andCImgLike(String value) {
            addCriterion("c_img like", value, "cImg");
            return (Criteria) this;
        }

        public Criteria andCImgNotLike(String value) {
            addCriterion("c_img not like", value, "cImg");
            return (Criteria) this;
        }

        public Criteria andCImgIn(List<String> values) {
            addCriterion("c_img in", values, "cImg");
            return (Criteria) this;
        }

        public Criteria andCImgNotIn(List<String> values) {
            addCriterion("c_img not in", values, "cImg");
            return (Criteria) this;
        }

        public Criteria andCImgBetween(String value1, String value2) {
            addCriterion("c_img between", value1, value2, "cImg");
            return (Criteria) this;
        }

        public Criteria andCImgNotBetween(String value1, String value2) {
            addCriterion("c_img not between", value1, value2, "cImg");
            return (Criteria) this;
        }

        public Criteria andCOriginalPriceIsNull() {
            addCriterion("c_original_price is null");
            return (Criteria) this;
        }

        public Criteria andCOriginalPriceIsNotNull() {
            addCriterion("c_original_price is not null");
            return (Criteria) this;
        }

        public Criteria andCOriginalPriceEqualTo(BigDecimal value) {
            addCriterion("c_original_price =", value, "cOriginalPrice");
            return (Criteria) this;
        }

        public Criteria andCOriginalPriceNotEqualTo(BigDecimal value) {
            addCriterion("c_original_price <>", value, "cOriginalPrice");
            return (Criteria) this;
        }

        public Criteria andCOriginalPriceGreaterThan(BigDecimal value) {
            addCriterion("c_original_price >", value, "cOriginalPrice");
            return (Criteria) this;
        }

        public Criteria andCOriginalPriceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("c_original_price >=", value, "cOriginalPrice");
            return (Criteria) this;
        }

        public Criteria andCOriginalPriceLessThan(BigDecimal value) {
            addCriterion("c_original_price <", value, "cOriginalPrice");
            return (Criteria) this;
        }

        public Criteria andCOriginalPriceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("c_original_price <=", value, "cOriginalPrice");
            return (Criteria) this;
        }

        public Criteria andCOriginalPriceIn(List<BigDecimal> values) {
            addCriterion("c_original_price in", values, "cOriginalPrice");
            return (Criteria) this;
        }

        public Criteria andCOriginalPriceNotIn(List<BigDecimal> values) {
            addCriterion("c_original_price not in", values, "cOriginalPrice");
            return (Criteria) this;
        }

        public Criteria andCOriginalPriceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("c_original_price between", value1, value2, "cOriginalPrice");
            return (Criteria) this;
        }

        public Criteria andCOriginalPriceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("c_original_price not between", value1, value2, "cOriginalPrice");
            return (Criteria) this;
        }

        public Criteria andCPresentPriceIsNull() {
            addCriterion("c_present_price is null");
            return (Criteria) this;
        }

        public Criteria andCPresentPriceIsNotNull() {
            addCriterion("c_present_price is not null");
            return (Criteria) this;
        }

        public Criteria andCPresentPriceEqualTo(BigDecimal value) {
            addCriterion("c_present_price =", value, "cPresentPrice");
            return (Criteria) this;
        }

        public Criteria andCPresentPriceNotEqualTo(BigDecimal value) {
            addCriterion("c_present_price <>", value, "cPresentPrice");
            return (Criteria) this;
        }

        public Criteria andCPresentPriceGreaterThan(BigDecimal value) {
            addCriterion("c_present_price >", value, "cPresentPrice");
            return (Criteria) this;
        }

        public Criteria andCPresentPriceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("c_present_price >=", value, "cPresentPrice");
            return (Criteria) this;
        }

        public Criteria andCPresentPriceLessThan(BigDecimal value) {
            addCriterion("c_present_price <", value, "cPresentPrice");
            return (Criteria) this;
        }

        public Criteria andCPresentPriceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("c_present_price <=", value, "cPresentPrice");
            return (Criteria) this;
        }

        public Criteria andCPresentPriceIn(List<BigDecimal> values) {
            addCriterion("c_present_price in", values, "cPresentPrice");
            return (Criteria) this;
        }

        public Criteria andCPresentPriceNotIn(List<BigDecimal> values) {
            addCriterion("c_present_price not in", values, "cPresentPrice");
            return (Criteria) this;
        }

        public Criteria andCPresentPriceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("c_present_price between", value1, value2, "cPresentPrice");
            return (Criteria) this;
        }

        public Criteria andCPresentPriceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("c_present_price not between", value1, value2, "cPresentPrice");
            return (Criteria) this;
        }

        public Criteria andCDescribeIsNull() {
            addCriterion("c_describe is null");
            return (Criteria) this;
        }

        public Criteria andCDescribeIsNotNull() {
            addCriterion("c_describe is not null");
            return (Criteria) this;
        }

        public Criteria andCDescribeEqualTo(String value) {
            addCriterion("c_describe =", value, "cDescribe");
            return (Criteria) this;
        }

        public Criteria andCDescribeNotEqualTo(String value) {
            addCriterion("c_describe <>", value, "cDescribe");
            return (Criteria) this;
        }

        public Criteria andCDescribeGreaterThan(String value) {
            addCriterion("c_describe >", value, "cDescribe");
            return (Criteria) this;
        }

        public Criteria andCDescribeGreaterThanOrEqualTo(String value) {
            addCriterion("c_describe >=", value, "cDescribe");
            return (Criteria) this;
        }

        public Criteria andCDescribeLessThan(String value) {
            addCriterion("c_describe <", value, "cDescribe");
            return (Criteria) this;
        }

        public Criteria andCDescribeLessThanOrEqualTo(String value) {
            addCriterion("c_describe <=", value, "cDescribe");
            return (Criteria) this;
        }

        public Criteria andCDescribeLike(String value) {
            addCriterion("c_describe like", value, "cDescribe");
            return (Criteria) this;
        }

        public Criteria andCDescribeNotLike(String value) {
            addCriterion("c_describe not like", value, "cDescribe");
            return (Criteria) this;
        }

        public Criteria andCDescribeIn(List<String> values) {
            addCriterion("c_describe in", values, "cDescribe");
            return (Criteria) this;
        }

        public Criteria andCDescribeNotIn(List<String> values) {
            addCriterion("c_describe not in", values, "cDescribe");
            return (Criteria) this;
        }

        public Criteria andCDescribeBetween(String value1, String value2) {
            addCriterion("c_describe between", value1, value2, "cDescribe");
            return (Criteria) this;
        }

        public Criteria andCDescribeNotBetween(String value1, String value2) {
            addCriterion("c_describe not between", value1, value2, "cDescribe");
            return (Criteria) this;
        }

        public Criteria andCValidIsNull() {
            addCriterion("c_valid is null");
            return (Criteria) this;
        }

        public Criteria andCValidIsNotNull() {
            addCriterion("c_valid is not null");
            return (Criteria) this;
        }

        public Criteria andCValidEqualTo(String value) {
            addCriterion("c_valid =", value, "cValid");
            return (Criteria) this;
        }

        public Criteria andCValidNotEqualTo(String value) {
            addCriterion("c_valid <>", value, "cValid");
            return (Criteria) this;
        }

        public Criteria andCValidGreaterThan(String value) {
            addCriterion("c_valid >", value, "cValid");
            return (Criteria) this;
        }

        public Criteria andCValidGreaterThanOrEqualTo(String value) {
            addCriterion("c_valid >=", value, "cValid");
            return (Criteria) this;
        }

        public Criteria andCValidLessThan(String value) {
            addCriterion("c_valid <", value, "cValid");
            return (Criteria) this;
        }

        public Criteria andCValidLessThanOrEqualTo(String value) {
            addCriterion("c_valid <=", value, "cValid");
            return (Criteria) this;
        }

        public Criteria andCValidLike(String value) {
            addCriterion("c_valid like", value, "cValid");
            return (Criteria) this;
        }

        public Criteria andCValidNotLike(String value) {
            addCriterion("c_valid not like", value, "cValid");
            return (Criteria) this;
        }

        public Criteria andCValidIn(List<String> values) {
            addCriterion("c_valid in", values, "cValid");
            return (Criteria) this;
        }

        public Criteria andCValidNotIn(List<String> values) {
            addCriterion("c_valid not in", values, "cValid");
            return (Criteria) this;
        }

        public Criteria andCValidBetween(String value1, String value2) {
            addCriterion("c_valid between", value1, value2, "cValid");
            return (Criteria) this;
        }

        public Criteria andCValidNotBetween(String value1, String value2) {
            addCriterion("c_valid not between", value1, value2, "cValid");
            return (Criteria) this;
        }

        public Criteria andCCreateTimeIsNull() {
            addCriterion("c_create_time is null");
            return (Criteria) this;
        }

        public Criteria andCCreateTimeIsNotNull() {
            addCriterion("c_create_time is not null");
            return (Criteria) this;
        }

        public Criteria andCCreateTimeEqualTo(Date value) {
            addCriterion("c_create_time =", value, "cCreateTime");
            return (Criteria) this;
        }

        public Criteria andCCreateTimeNotEqualTo(Date value) {
            addCriterion("c_create_time <>", value, "cCreateTime");
            return (Criteria) this;
        }

        public Criteria andCCreateTimeGreaterThan(Date value) {
            addCriterion("c_create_time >", value, "cCreateTime");
            return (Criteria) this;
        }

        public Criteria andCCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("c_create_time >=", value, "cCreateTime");
            return (Criteria) this;
        }

        public Criteria andCCreateTimeLessThan(Date value) {
            addCriterion("c_create_time <", value, "cCreateTime");
            return (Criteria) this;
        }

        public Criteria andCCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("c_create_time <=", value, "cCreateTime");
            return (Criteria) this;
        }

        public Criteria andCCreateTimeIn(List<Date> values) {
            addCriterion("c_create_time in", values, "cCreateTime");
            return (Criteria) this;
        }

        public Criteria andCCreateTimeNotIn(List<Date> values) {
            addCriterion("c_create_time not in", values, "cCreateTime");
            return (Criteria) this;
        }

        public Criteria andCCreateTimeBetween(Date value1, Date value2) {
            addCriterion("c_create_time between", value1, value2, "cCreateTime");
            return (Criteria) this;
        }

        public Criteria andCCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("c_create_time not between", value1, value2, "cCreateTime");
            return (Criteria) this;
        }

        public Criteria andCAndCcIsNull() {
            addCriterion("c_and_cc is null");
            return (Criteria) this;
        }

        public Criteria andCAndCcIsNotNull() {
            addCriterion("c_and_cc is not null");
            return (Criteria) this;
        }

        public Criteria andCAndCcEqualTo(Long value) {
            addCriterion("c_and_cc =", value, "cAndCc");
            return (Criteria) this;
        }

        public Criteria andCAndCcNotEqualTo(Long value) {
            addCriterion("c_and_cc <>", value, "cAndCc");
            return (Criteria) this;
        }

        public Criteria andCAndCcGreaterThan(Long value) {
            addCriterion("c_and_cc >", value, "cAndCc");
            return (Criteria) this;
        }

        public Criteria andCAndCcGreaterThanOrEqualTo(Long value) {
            addCriterion("c_and_cc >=", value, "cAndCc");
            return (Criteria) this;
        }

        public Criteria andCAndCcLessThan(Long value) {
            addCriterion("c_and_cc <", value, "cAndCc");
            return (Criteria) this;
        }

        public Criteria andCAndCcLessThanOrEqualTo(Long value) {
            addCriterion("c_and_cc <=", value, "cAndCc");
            return (Criteria) this;
        }

        public Criteria andCAndCcIn(List<Long> values) {
            addCriterion("c_and_cc in", values, "cAndCc");
            return (Criteria) this;
        }

        public Criteria andCAndCcNotIn(List<Long> values) {
            addCriterion("c_and_cc not in", values, "cAndCc");
            return (Criteria) this;
        }

        public Criteria andCAndCcBetween(Long value1, Long value2) {
            addCriterion("c_and_cc between", value1, value2, "cAndCc");
            return (Criteria) this;
        }

        public Criteria andCAndCcNotBetween(Long value1, Long value2) {
            addCriterion("c_and_cc not between", value1, value2, "cAndCc");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}